package org.anjan.dp.strategy;

import org.anjan.dp.strategy.impl.ducks.MallardDuck;
import org.anjan.dp.strategy.impl.ducks.ModelDuck;
import org.anjan.dp.strategy.impl.fly.FlyLikeRocket;

/**
 * Created by chebbaso on 12/4/14.
 */

/*
* Mallard duck is a duck
* Model duck is a duck
* Duck has a Fly Behavior
* Duck has a Quack Behavior
* FlyNoWay implements FlyBehavior
* Quack implements QuackBehavior
* */
public class Main {
    public static void main(String[] args) {
        Duck mallardDuck = new MallardDuck();
        mallardDuck.display();
        mallardDuck.performQuack();
        mallardDuck.performFly();
        mallardDuck.swim();

        Duck modelDuck = new ModelDuck();
        modelDuck.display();
        modelDuck.performFly();
        modelDuck.performQuack();
        modelDuck.swim();
        modelDuck.setFlyBehavior(new FlyLikeRocket());
        modelDuck.performFly();
    }
}
